package com.zf.service.Impl;

import com.zf.mapper.flightMapper;
import com.zf.pojo.flight;
import com.zf.service.flightService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class flightServiceImpl implements flightService {
    @Autowired
    flightMapper flightMapper;

    @Override
    public List<flight> queryFlight() {
        System.out.println("test");
       return  flightMapper.queryFlight();
    }

    @Override
    public int deleteFlight(String flightnumber) {
        return flightMapper.deleteFlight(flightnumber);
    }

    @Override
    public int addFlight(flight flight1) {
        return flightMapper.addFlight(flight1);
    }

    @Override
    public List<flight> queryMinPrice(String startPlace, String endPlace) {
        return flightMapper.queryMinPrice(startPlace,endPlace);
    }

    @Override
    public List<flight> queryMinTime(String startPlace, String endPlace) {
        return flightMapper.queryMinTime(startPlace,endPlace);
    }
}
